﻿using DevExpress.Blazor;
using DevExpress.ExpressApp.Blazor.Components.Models;
using Microsoft.AspNetCore.Components;

namespace HC.XAP.FileUpload.Blazor.Server.Editors.DxBatchUpload
{
    public class DxBatchUploadModel:ComponentModelBase
    {
        public override Type ComponentType => typeof(DxFileInput);

        public EventCallback<FilesUploadingEventArgs> FilesUploading
        {
            get => GetPropertyValue<EventCallback<FilesUploadingEventArgs>>();
            set => SetPropertyValue(value);
        }
        public EventCallback<IEnumerable<UploadFileInfo>> SelectedFilesChanged { get; set; }
        public bool AllowMultiFileUpload
        {
            get => GetPropertyValue<bool>();
            set => SetPropertyValue(value);
        }

        public UploadMode UploadMode
        {
            get => GetPropertyValue<UploadMode>();
            set => SetPropertyValue(value);
        }

        public bool AllowCancel
        {
            get => GetPropertyValue<bool>();
            set => SetPropertyValue(value);
        }
        public string SelectButtonText { get; set; }
        public int MaxFileCount { get; set; }
    }
}
